<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>
        <input type="text" class="zuo">
        +
        <input type="text" class="you">
        =
        <input type="text" class="jie">
        <button class="qiu">求和</button>
    </div>
</body>
</html>
<script>
    var zuo=document.querySelector(".zuo")
    var you=document.querySelector(".you")
    var jie=document.querySelector(".jie")
    var qiu=document.querySelector(".qiu")
    qiu.onclick=function(){
        jie.value=parseInt(zuo.value)+parseInt(you.value)
    }
    
</script>
<style>
    div{
        margin: 0 auto;
    }

</style>